package com.example.wechat.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import com.example.wechat.model.WechatUserContact;

/**
 * 用户好友关系Mapper接口
 * 
 * @author ruoyi
 * @date 2025-11-12
 */
public interface WechatUserContactMapper {

	@Select("select id,user_id,contact_id,remark_name,relation_status,create_time,update_time from t_wechat_user_contact where user_id = ${userId} and contact_id = ${contactId}")
	public WechatUserContact queryByUserIdAndContactId(long userId, long contactId);

	@Insert("insert into t_wechat_user_contact(user_id, contact_id, remark_name, relation_status) values(#{userId}, #{contactId}, #{remarkName}, #{relationStatus})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public long insert(WechatUserContact info);
}
